package com.yunc.common.queue.activemq;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Component;

import javax.jms.Destination;

/**
 * activemq发送者
 *
 * @author tao cong cong
 * @create 2019/3/17 12:43 PM
 */
@Component
public class ActiveMQSender {

    @Autowired
    private JmsMessagingTemplate innerActivemqTemplate;

    public void sendChannelMess(Destination destination, final String message) {
        innerActivemqTemplate.convertAndSend(destination, message);
    }

    public void sendTopicChannelMess(Destination destination, final String message) {
        innerActivemqTemplate.convertAndSend(destination, message);
    }
}
